Skip to content

Conversation

@mbillow
Copy link
Member

@mbillow mbillow commented Jun 19, 2017

Added processors for structlog that grab the Flask request object and then log any modifications made to the database.

Fixes #142

logger.info('backend',
action=("gave attendance to freshman-%s for %s" % (f, committee))
)
logger.info('Gave Attendance to freshman-{} for {}'.format(f, committee))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be ‘log’ not ‘logger’.

logger.info('backend',
action=("gave attendance to %s for %s" % (m, seminar_name))
)
logger.info('Gave Attendance to {} for {}'.format(m, seminar_name))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

logger.info('backend',
action=("gave attendance to freshman-%s for %s" % (f, seminar_name))
)
logger.info('Gave Attendance to freshman-{} for {}'.format(f, seminar_name))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

"gave %s to %s for %s house meeting" % (
m['status'], m['uid'], timestamp.strftime("%Y-%m-%d")))
)
logger.info('Marked {} {} for House Meeting on {}'.format(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

action=("gave %s to freshman-%s for %s house meeting" % (
f['status'], f['id'], timestamp.strftime("%Y-%m-%d")))
)
logger.info('Marked freshman-{} {} for House Meeting on {}'.format(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same

Copy link
Member

@liam-middlebrook liam-middlebrook left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 thanks for generalizing this BTW into structlog extensions, it should be super useful for future projects.

@mbillow mbillow merged commit 9f71dce into ComputerScienceHouse:develop Jun 21, 2017
@mbillow mbillow deleted the logging branch June 21, 2017 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants